import argparse
import sys

# step 1

ap = argparse.ArgumentParser()

# step 2: configure object
ap.add_argument("-H", dest="host", type=str, help="The host to ping", required=True)
ap.add_argument("-p", dest="port", type=int, help="The port to ping", required=True)

# step 3: parse command line
argu = ap.parse_args(sys.argv[1:])
print(argu.host, argu.port)

